package com.example.himalaya.utils;

import com.example.himalaya.base.BaseFragment;
import com.example.himalaya.view.fragments.AnnouncerDetailFragment;
import com.example.himalaya.view.fragments.HistoryViewFragment;
import com.example.himalaya.view.fragments.SubscriptionViewFragment;

public class AnnouncerFragmentCreator {

    // Constance
    private final static int INDEX_SONG = 0;
    private final static int INDEX_ALBUM = 1;
    private final static int INDEX_ANNOUNCER_DETAILS = 2;

    public final static int PAGE_COUNT = 3;

    // Map
//    private static Map<Integer, BaseFragment> sCache = new HashMap<>();


    public static BaseFragment getFragment(int index) {
        BaseFragment baseFragment = null;


        switch (index) {
            case INDEX_SONG:
                baseFragment = new HistoryViewFragment();
                break;
            case INDEX_ALBUM:
                baseFragment = new SubscriptionViewFragment();
                break;
            case INDEX_ANNOUNCER_DETAILS:
                baseFragment = new AnnouncerDetailFragment();
                break;
            default:
                LogUtil.d("utils/MainFragmentCreator", "Some Logic wrong");
                break;
        }


        return baseFragment;
    }
}
